﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FoneBuddy.LinqModel.Data;

namespace FoneBuddy.LinqModel
{
  public partial  class Address
    {
       #region Variable Declaration
        private IDataRepository _dataObject;
        #endregion
        public Address(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public void Create()
        {
            try
            {
                _dataObject.CreateMerchantAddress(this);
            }
            catch (Exception ex)
            {

            }

        }
       public List<Address> GetAddressByMerchantId()
        {
            return _dataObject.GetAddressByMerchantId(this); 
        }
       public void Update()
       {
           _dataObject.UpdateAddress(this);
       }
  
    }
}
